.class public Lrexsee/core/browser/RexseePreload;
.super Ljava/lang/Object;
.source "RexseePreload.java"

# interfaces
.implements Lrexsee/core/browser/clazz/JavascriptInterface;


# static fields
.field private static final INTERFACE_NAME:Ljava/lang/String; = "Preload"


# instance fields
.field private final listener:Lrexsee/core/browser/clazz/PreloadFilterListener;

.field private final mBrowser:Lrexsee/core/browser/Browser;


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;)V
    .locals 2
    .param p1, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 26
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 27
    iput-object p1, p0, Lrexsee/core/browser/RexseePreload;->mBrowser:Lrexsee/core/browser/Browser;

    .line 28
    new-instance v0, Lrexsee/core/browser/clazz/PreloadFilterListener;

    invoke-direct {v0}, Lrexsee/core/browser/clazz/PreloadFilterListener;-><init>()V

    iput-object v0, p0, Lrexsee/core/browser/RexseePreload;->listener:Lrexsee/core/browser/clazz/PreloadFilterListener;

    .line 29
    iget-object v0, p1, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    iget-object v1, p0, Lrexsee/core/browser/RexseePreload;->listener:Lrexsee/core/browser/clazz/PreloadFilterListener;

    invoke-virtual {v0, v1}, Lrexsee/core/browser/RexseeUrl;->addFilter(Lrexsee/core/browser/clazz/FilterListener;)V

    .line 30
    return-void
.end method

.method static synthetic access$0(Lrexsee/core/browser/RexseePreload;)Lrexsee/core/browser/Browser;
    .locals 1

    .prologue
    .line 23
    iget-object v0, p0, Lrexsee/core/browser/RexseePreload;->mBrowser:Lrexsee/core/browser/Browser;

    return-object v0
.end method

.method static synthetic access$1(Lrexsee/core/browser/RexseePreload;)Lrexsee/core/browser/clazz/PreloadFilterListener;
    .locals 1

    .prologue
    .line 24
    iget-object v0, p0, Lrexsee/core/browser/RexseePreload;->listener:Lrexsee/core/browser/clazz/PreloadFilterListener;

    return-object v0
.end method


# virtual methods
.method public contains(Ljava/lang/String;)Z
    .locals 1
    .param p1, "url"    # Ljava/lang/String;

    .prologue
    .line 53
    iget-object v0, p0, Lrexsee/core/browser/RexseePreload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    invoke-virtual {v0, p1}, Lrexsee/core/browser/RexseeUrl;->getAbsoluteUrl(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    .line 54
    iget-object v0, p0, Lrexsee/core/browser/RexseePreload;->listener:Lrexsee/core/browser/clazz/PreloadFilterListener;

    invoke-virtual {v0, p1}, Lrexsee/core/browser/clazz/PreloadFilterListener;->containsUrl(Ljava/lang/String;)Z

    move-result v0

    return v0
.end method

.method public get()Ljava/lang/String;
    .locals 1

    .prologue
    .line 64
    iget-object v0, p0, Lrexsee/core/browser/RexseePreload;->listener:Lrexsee/core/browser/clazz/PreloadFilterListener;

    invoke-virtual {v0}, Lrexsee/core/browser/clazz/PreloadFilterListener;->getUrls()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getCode(Ljava/lang/String;)Ljava/lang/String;
    .locals 2
    .param p1, "url"    # Ljava/lang/String;

    .prologue
    .line 67
    iget-object v1, p0, Lrexsee/core/browser/RexseePreload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    invoke-virtual {v1, p1}, Lrexsee/core/browser/RexseeUrl;->getAbsoluteUrl(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    .line 68
    iget-object v1, p0, Lrexsee/core/browser/RexseePreload;->listener:Lrexsee/core/browser/clazz/PreloadFilterListener;

    invoke-virtual {v1, p1}, Lrexsee/core/browser/clazz/PreloadFilterListener;->getCode(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 69
    .local v0, "rtn":Ljava/lang/String;
    if-nez v0, :cond_0

    const-string v1, ""

    :goto_0
    return-object v1

    :cond_0
    move-object v1, v0

    goto :goto_0
.end method

.method public getInheritInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 16
    new-instance v0, Lrexsee/core/browser/RexseePregFilter;

    invoke-direct {v0, p1}, Lrexsee/core/browser/RexseePregFilter;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public getInterfaceName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 12
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lrexsee/core/browser/RexseePreload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "Preload"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getNewInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 20
    new-instance v0, Lrexsee/core/browser/RexseePregFilter;

    invoke-direct {v0, p1}, Lrexsee/core/browser/RexseePregFilter;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public preload(Ljava/lang/String;)V
    .locals 2
    .param p1, "theUrl"    # Ljava/lang/String;

    .prologue
    .line 34
    iget-object v1, p0, Lrexsee/core/browser/RexseePreload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    invoke-virtual {v1, p1}, Lrexsee/core/browser/RexseeUrl;->getAbsoluteUrl(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 35
    .local v0, "url":Ljava/lang/String;
    invoke-virtual {p0, v0}, Lrexsee/core/browser/RexseePreload;->contains(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 48
    :goto_0
    return-void

    .line 36
    :cond_0
    new-instance v1, Lrexsee/core/browser/RexseePreload$1;

    invoke-direct {v1, p0, v0}, Lrexsee/core/browser/RexseePreload$1;-><init>(Lrexsee/core/browser/RexseePreload;Ljava/lang/String;)V

    .line 47
    invoke-virtual {v1}, Lrexsee/core/browser/RexseePreload$1;->start()V

    goto :goto_0
.end method

.method public remove()V
    .locals 1

    .prologue
    .line 61
    iget-object v0, p0, Lrexsee/core/browser/RexseePreload;->listener:Lrexsee/core/browser/clazz/PreloadFilterListener;

    invoke-virtual {v0}, Lrexsee/core/browser/clazz/PreloadFilterListener;->remove()V

    .line 62
    return-void
.end method

.method public remove(Ljava/lang/String;)V
    .locals 1
    .param p1, "url"    # Ljava/lang/String;

    .prologue
    .line 57
    iget-object v0, p0, Lrexsee/core/browser/RexseePreload;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    invoke-virtual {v0, p1}, Lrexsee/core/browser/RexseeUrl;->getAbsoluteUrl(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    .line 58
    iget-object v0, p0, Lrexsee/core/browser/RexseePreload;->listener:Lrexsee/core/browser/clazz/PreloadFilterListener;

    invoke-virtual {v0, p1}, Lrexsee/core/browser/clazz/PreloadFilterListener;->remove(Ljava/lang/String;)V

    .line 59
    return-void
.end method

.method public size()I
    .locals 1

    .prologue
    .line 50
    iget-object v0, p0, Lrexsee/core/browser/RexseePreload;->listener:Lrexsee/core/browser/clazz/PreloadFilterListener;

    invoke-virtual {v0}, Lrexsee/core/browser/clazz/PreloadFilterListener;->getNumberOfUrls()I

    move-result v0

    return v0
.end method
